reading-notes

TDD with Python

-The greatest advantage about TDD is to craft the software design first

-Your code will be more reliable: after a change you can run your tests and be in peace

mymodule/
 — module.py
 — another_folder/
 — — another_module.py
tests/
 — test_module.py
 — another_folder/
 — — test_another_module.py
  1. Arrange: you need to organize the data needed to execute that piece of code (input);
  2. Act: here you will execute the code being tested (exercise the behaviour);
  3. Assert: after executing the code, you will check if the result (output) is the same as you were expecting.

Recursion

How memory is allocated to different function calls in recursion?